package com.yangsir.mysite.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yangsir.mysite.Dto.ArticleUserDto;
import com.yangsir.mysite.common.R;
import com.yangsir.mysite.pojo.Article;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author yf
 * @description 针对表【article(文章)】的数据库操作Service
 * @createDate 2024-06-22 16:55:16
 */
public interface ArticleService extends IService<Article> {

    R<String> saveArticle(Article article);

    R<Page> pageQuery(Integer page, Integer pageSize, Integer type, Long categoryId, String clickedtags);

    R<Article> getOneArticle(Long id);

    R<List<ArticleUserDto>> getArticlesByUserId(HttpServletRequest httpServletRequest);

    R<List<ArticleUserDto>> getArticlesByStr(String str);

    R<String> deleteArticle(Long id);

    R<String> topArticle(Article article);

    List<Article> getTopArticle();

    R<List<ArticleUserDto>> getArticlesByTypeOrCategory(Integer type, Long categoryId, HttpServletRequest httpServletRequest);

    R<List<Article>> getArticlesByCategory(Long categoryId);
}
